<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="language" content="en" />

	<!-- blueprint CSS framework -->
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/screen.css" media="screen, projection" />
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/print.css" media="print" />
	<!--[if lt IE 8]>
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/ie.css" media="screen, projection" />
	<![endif]-->

	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/main.css" />
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/form.css" />
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/rbac.css" />
        <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/smoothness/jquery-ui-1.8.5.custom.css" />
        <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/Lib/greybox/gb_styles.css" mce_href=”/Lib/greybox/gb_styles.css” />
        
        <script type="text/javascript" src="<?php echo Yii::app()->request->baseUrl; ?>/js/jquery.table.addrow.js"></script>
        
         <script type="text/javascript">
            var GB_ROOT_DIR = '<?php echo Yii::app()->request->baseUrl; ?>/Lib/greybox/';
//            var GB_BASE_URL = '<?php echo Yii::app()->request->baseUrl; ?>/index.php';
        </script>
        
        <?php
        //TODO: Organizar includes
        $cs=Yii::app()->clientScript;
        $cs->registerCoreScript('jquery');

        //CA
        //$cs->registerScriptFile(Yii::app()->request->baseUrl . '/js/jquery-ui.min.js', CClientScript::POS_HEAD);
        $cs->registerScriptFile(Yii::app()->request->baseUrl . '/js/jquery-ui-1.10.1.custom.min.js', CClientScript::POS_HEAD);
        $cs->registerScriptFile(Yii::app()->request->baseUrl . '/js/jquery.table.addrow.js', CClientScript::POS_HEAD);
        $cs->registerScriptFile(Yii::app()->request->baseUrl . '/js/jquery.ui.datepicker-es.js', CClientScript::POS_HEAD);
        $cs->registerScriptFile(Yii::app()->request->baseUrl . '/js/jquery-ui-timepicker-addon.js', CClientScript::POS_HEAD);
        $cs->registerScriptFile(Yii::app()->request->baseUrl . '/Lib/jquery/jquery.selectboxes.min.js', CClientScript::POS_HEAD);
        $cs->registerScriptFile(Yii::app()->request->baseUrl . '/Lib/greybox/AJS.js', CClientScript::POS_HEAD);
        $cs->registerScriptFile(Yii::app()->request->baseUrl . '/Lib/greybox/AJS_fx.js', CClientScript::POS_HEAD);
        $cs->registerScriptFile(Yii::app()->request->baseUrl . '/Lib/greybox/gb_scripts.js', CClientScript::POS_HEAD);

        ?>

	<title><?php echo CHtml::encode($this->pageTitle); ?></title>
</head>

<body>
    
    <?php date_default_timezone_set('America/Bogota'); ?>

    <div class="container" id="page">

	<div id="header">
            <div id="logo1"></div>
                <div id="logo">
                    <img alt="Sistema de Seguimiento Plan de Pagos" src="<?php echo Yii::app()->baseUrl ?>/images/logo-info.png" />
                </div>
	</div><!-- header -->

	<div class="nav" id="mainmenu">
		<?php //$this->widget('zii.widgets.CMenu',array(
                    
//                    $perfil = Yii::app()->user->isGuest ? '' : Yii::app()->user->perfil;
                    $this->widget('application.extensions.mbmenu.MbMenu', array(
			'items'=>array(
				array('label'=>'Inicio', 'url'=>array('/site/index')),
				array('label'=>'Contacto', 'url'=>array('/site/contact')),
				array('label'=>'Usuarios', 'url'=>array('/usuarios/admin'), 'visible'=>!Yii::app()->user->isGuest),
				array('label'=>'Login', 'url'=>array('/site/login'), 'visible'=>Yii::app()->user->isGuest),
				array('label'=>'Logout ('.Yii::app()->user->name.')', 'url'=>array('/site/logout'), 'visible'=>!Yii::app()->user->isGuest)
			),
                        
                    )); 
                ?>

        </div><!-- mainmenu -->
	<?php if(isset($this->breadcrumbs)):?>
		<?php $this->widget('zii.widgets.CBreadcrumbs', array(
			'links'=>$this->breadcrumbs,
		)); ?><!-- breadcrumbs -->
	<?php endif?>
                
                


	<?php echo $content; ?>

	<div class="clear"></div>
        
        <div id="footer-bar"></div>
        
	<div id="footer">
		Copyright &copy; <?php echo date('Y'); ?> by IEO Ingenieros Electrónicos S.A.S.<br/>
		All Rights Reserved.<br/>
	</div><!-- footer -->

    </div><!-- page -->

</body>
</html>